home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / fruit.swf / scripts / frame_1 / DoAction.as
Text File  |  2006-01-17  |  69KB  |  2,680 lines

  1. if(include_Library_Complete != true)
  2. {
  3.    var include_Library_Complete = true;
  4.    var hello = "created 3wgraphics design studio. www.3wgraphics.net 1999-2002";
  5.    delete hello;
  6.    Object.prototype.toXML = function(name, num)
  7.    {
  8.       if(name == null)
  9.       {
  10.          name = typeof this;
  11.       }
  12.       if(num == null)
  13.       {
  14.          num = 1;
  15.          _root.array_for_delete_numbers = [];
  16.       }
  17.       var proto = this.__proto__;
  18.       this.__proto__ = undefined;
  19.       var attr = " id=\"" + num + ".0" + "\"";
  20.       this.number_for_trace_objects = num;
  21.       _root.array_for_delete_numbers.push(this);
  22.       if(name == "movieclip")
  23.       {
  24.          attr += " name=\"" + this._name + "\"";
  25.       }
  26.       var XML_result = new XML("<" + name + attr + "><tmp /></" + name + ">");
  27.       var type;
  28.       var element;
  29.       var marks;
  30.       for(var v in this)
  31.       {
  32.          if(!(v == "__proto__" || v == "number_for_trace_objects" || v == "array_for_delete_numbers"))
  33.          {
  34.             type = typeof this[v];
  35.             if(type == "object" || type == "movieclip")
  36.             {
  37.                if(!this[v].number_for_trace_objects)
  38.                {
  39.                   if(this[v].__proto__ == Array.prototype)
  40.                   {
  41.                      type = "Array";
  42.                   }
  43.                   else if(isXML(this[v]))
  44.                   {
  45.                      type = "XML";
  46.                   }
  47.                   else if(this[v].__proto__ == XMLSocket.prototype)
  48.                   {
  49.                      type = "XMLSocket";
  50.                   }
  51.                   else if(this[v].__proto__ == Sound.prototype)
  52.                   {
  53.                      type = "Sound";
  54.                   }
  55.                   element = new XML("<" + v + " />");
  56.                   if(type == "XML")
  57.                   {
  58.                      element.firstChild.appendChild(this[v].firstChild.cloneNode(true));
  59.                   }
  60.                   else
  61.                   {
  62.                      element.firstChild.appendChild(this[v].toXML(type,++num).firstChild);
  63.                   }
  64.                }
  65.                else
  66.                {
  67.                   this[v].number_for_trace_objects += 0.01;
  68.                   attr = " id=\"" + this[v].number_for_trace_objects + "\"";
  69.                   if(type == "movieclip")
  70.                   {
  71.                      attr += " name=\"" + this[v]._name + "\"";
  72.                   }
  73.                   element = new XML("<" + v + attr + " />");
  74.                }
  75.             }
  76.             else
  77.             {
  78.                marks = type != "string" ? "" : "\"";
  79.                if(type == "number" || type == "string" || type == "boolean")
  80.                {
  81.                   attr = "";
  82.                }
  83.                else
  84.                {
  85.                   attr = " type=\"" + type + "\"";
  86.                }
  87.                element = new XML("<" + v + (type != "function" ? "" : " type=\"function\"") + ">" + " " + marks + this[v] + marks + " " + "</" + v + ">");
  88.                if(element.firstChild.firstChild.nodeType == 3 && element.firstChild.firstChild.nodeValue == "  ")
  89.                {
  90.                   element.firstChild.firstChild.removeNode();
  91.                }
  92.             }
  93.             XML_result.firstChild.insertBefore(element.firstChild,XML_result.firstChild.firstChild);
  94.          }
  95.       }
  96.       XML_result.firstChild.lastChild.removeNode();
  97.       if(XML_result.firstChild.attributes.id == "1.0")
  98.       {
  99.          var i = 0;
  100.          while(i < _root.array_for_delete_numbers.length)
  101.          {
  102.             delete _root.array_for_delete_numbers[i].number_for_trace_objects;
  103.             i++;
  104.          }
  105.          delete _root.array_for_delete_numbers;
  106.       }
  107.       this.__proto__ = proto;
  108.       return XML_result;
  109.    };
  110.    Object.prototype.toString = function()
  111.    {
  112.       return this.toXML("Object").toString2();
  113.    };
  114.    Object.prototype.trace = function()
  115.    {
  116.       trace(this.toXML().toString2());
  117.    };
  118.    Function.prototype.toString = function()
  119.    {
  120.       return "function";
  121.    };
  122.    XMLNode.prototype.toString1 = XMLNode.prototype.toString;
  123.    XMLNode.prototype.toString = function()
  124.    {
  125.       if(this.tabDesign)
  126.       {
  127.          return this.toString2();
  128.       }
  129.       return this.toString1();
  130.    };
  131.    XMLNode.prototype.toString2 = function(tab)
  132.    {
  133.       var traced_value = "";
  134.       if(this.nodeType != 3)
  135.       {
  136.          if(this.nodeName != null)
  137.          {
  138.             traced_value = "<" + this.nodeName;
  139.             for(var v in this.attributes)
  140.             {
  141.                traced_value += " " + v + "=\"" + this.attributes[v] + "\"";
  142.             }
  143.             if(this.firstChild == null)
  144.             {
  145.                traced_value += " />";
  146.             }
  147.             else if(this.firstChild.nodeType == 3 && this.firstChild == this.lastChild)
  148.             {
  149.                traced_value += ">" + this.firstChild.toString2() + "</" + this.nodeName + ">";
  150.             }
  151.             else
  152.             {
  153.                traced_value += ">\r     " + tab + this.firstChild.toString2(tab + "     ") + "\r" + tab + "</" + this.nodeName + ">";
  154.             }
  155.          }
  156.          else
  157.          {
  158.             traced_value = this.firstChild.toString2("");
  159.          }
  160.       }
  161.       else
  162.       {
  163.          traced_value = this.nodeValue;
  164.       }
  165.       if(this.nextSibling != null)
  166.       {
  167.          traced_value += "\r" + tab + this.nextSibling.toString2(tab);
  168.       }
  169.       return traced_value;
  170.    };
  171.    ASSetPropFlags(Object.prototype,"toXML,trace",131);
  172.    ASSetPropFlags(XMLNode.prototype,"toString1,toString2,tabDesign",131);
  173.    var o = Object.prototype;
  174.    o["set"] = function(param, value)
  175.    {
  176.       this[param] = value;
  177.    };
  178.    o.clone = function()
  179.    {
  180.       var o = new this.constructor();
  181.       o.__proto__ = this.__proto__;
  182.       return o.copy(this);
  183.    };
  184.    o.copy = function(o)
  185.    {
  186.       var proto = o.__proto__;
  187.       o.__proto__ = undefined;
  188.       for(var v in o)
  189.       {
  190.          this[v] = o[v];
  191.       }
  192.       o.__proto__ = proto;
  193.       return this;
  194.    };
  195.    o.clear = function()
  196.    {
  197.       var proto = this.__proto__;
  198.       this.__proto__ = undefined;
  199.       for(var v in this)
  200.       {
  201.          delete this[v];
  202.       }
  203.       this.__proto__ = proto;
  204.       this.constructor.apply(this,arguments);
  205.    };
  206.    o.applyClass = function(c)
  207.    {
  208.       if(typeof c != "function")
  209.       {
  210.          return false;
  211.       }
  212.       this.__proto__ = c.prototype;
  213.       c.apply(this,arguments.slice(1));
  214.       return true;
  215.    };
  216.    o.paramHide = function(paramsArray)
  217.    {
  218.       ASSetPropFlags(this,paramsArray || null,1);
  219.    };
  220.    o.paramShow = function(paramsArray)
  221.    {
  222.       ASSetPropFlags(this,paramsArray || null,2);
  223.    };
  224.    o.paramLock = function(paramsArray)
  225.    {
  226.       ASSetPropFlags(this,paramsArray || null,7);
  227.    };
  228.    Object.combine = function(obj, oldFoo, newFoo)
  229.    {
  230.       var oldFoo_bk = obj[oldFoo];
  231.       var foo_combine = function()
  232.       {
  233.          newFoo.apply(this,arguments);
  234.          return oldFoo_bk.apply(this,arguments);
  235.       };
  236.       obj[oldFoo] = foo_combine;
  237.    };
  238.    o.paramHide();
  239.    Object.paramHide();
  240.    var o = Array.prototype;
  241.    o.nSort = function()
  242.    {
  243.       this.sort(function(a, b)
  244.       {
  245.          if(Number(a) < Number(b))
  246.          {
  247.             return -1;
  248.          }
  249.          if(Number(a) > Number(b))
  250.          {
  251.             return 1;
  252.          }
  253.          return 0;
  254.       }
  255.       );
  256.       return this;
  257.    };
  258.    o.sortOnNum = function(param)
  259.    {
  260.       this.sort(function(a, b)
  261.       {
  262.          a = a[param];
  263.          b = b[param];
  264.          if(!isNaN(a))
  265.          {
  266.             a = Number(a);
  267.          }
  268.          if(!isNaN(b))
  269.          {
  270.             b = Number(b);
  271.          }
  272.          return (a < b) * -1 || (a > b) * 1 || 0;
  273.       }
  274.       );
  275.    };
  276.    o.trim = function(searched_array, rec)
  277.    {
  278.       var l = this.length;
  279.       if(searched_array == undefined)
  280.       {
  281.          searched_array = ["",null];
  282.       }
  283.       var i = 0;
  284.       while(i < this.length)
  285.       {
  286.          if(searched_array.indexOf(this[i]) != -1 || rec && this[i].trim(searched_array,true))
  287.          {
  288.             this.splice(i,1);
  289.             i--;
  290.          }
  291.          i++;
  292.       }
  293.       return l != this.length;
  294.    };
  295.    o.match = function(searched)
  296.    {
  297.       var test = 0;
  298.       if(searched instanceof Array)
  299.       {
  300.          var i = 0;
  301.          while(i < this.length)
  302.          {
  303.             if(searched.indexOf(this[i]) != -1)
  304.             {
  305.                test++;
  306.             }
  307.             i++;
  308.          }
  309.       }
  310.       else
  311.       {
  312.          var i = 0;
  313.          while(i < this.length)
  314.          {
  315.             if(searched == this[i])
  316.             {
  317.                test++;
  318.             }
  319.             i++;
  320.          }
  321.       }
  322.       return test;
  323.    };
  324.    o.indexOf = function(searched)
  325.    {
  326.       var i = 0;
  327.       while(i < this.length)
  328.       {
  329.          if(searched == this[i])
  330.          {
  331.             return i;
  332.          }
  333.          i++;
  334.       }
  335.       return -1;
  336.    };
  337.    o.random = function()
  338.    {
  339.       var random_i = this.length;
  340.       while(random_i > 0)
  341.       {
  342.          this.push(this.splice(Math.floor(Math.random() * random_i),1)[0]);
  343.          random_i--;
  344.       }
  345.       return this;
  346.    };
  347.    o.paramHide();
  348.    var o = MovieClip.prototype;
  349.    o.movieTo = function()
  350.    {
  351.       this._x = arguments[0];
  352.       this._y = arguments[1];
  353.    };
  354.    o.movieBy = function()
  355.    {
  356.       this._x += arguments[0];
  357.       this._y += arguments[1];
  358.    };
  359.    o.size = function()
  360.    {
  361.       if(arguments[0] != null && arguments[0] != 0)
  362.       {
  363.          this._width = arguments[0];
  364.       }
  365.       if(arguments[0] != null && arguments[0] != 0)
  366.       {
  367.          this._height = arguments[1];
  368.       }
  369.    };
  370.    o.scale = function()
  371.    {
  372.       this._xscale = this._yscale = arguments[0];
  373.    };
  374.    o.scaleTo = function(xscale, yscale)
  375.    {
  376.       if(arguments[0] != null && arguments[0] != 0)
  377.       {
  378.          this._xscale = arguments[0];
  379.       }
  380.       if(arguments[1] != null && arguments[1] != 0)
  381.       {
  382.          this._yscale = arguments[1];
  383.       }
  384.    };
  385.    o.scaleBy = function()
  386.    {
  387.       this._xscale *= arguments[0];
  388.       this._yscale *= arguments[0];
  389.    };
  390.    o.rotateBy = function()
  391.    {
  392.       this._rotation += arguments[0];
  393.    };
  394.    o.hide = function()
  395.    {
  396.       this._visible = 0;
  397.    };
  398.    o.show = function()
  399.    {
  400.       this._visible = 1;
  401.    };
  402.    o.visInvert = function()
  403.    {
  404.       this._visible = !this._visible;
  405.    };
  406.    o.flipV = function()
  407.    {
  408.       this._xscale *= -1;
  409.    };
  410.    o.flipH = function()
  411.    {
  412.       this._yscale *= -1;
  413.    };
  414.    o.playOffset = function()
  415.    {
  416.       this.gotoAndPlay(this._currentframe + arguments[0]);
  417.    };
  418.    o.childs = function()
  419.    {
  420.       var result_childs = new Array();
  421.       for(var v in this)
  422.       {
  423.          if(typeof this[v] == "movieclip" && this[v]._parent == this)
  424.          {
  425.             result_childs.push(this[v]);
  426.          }
  427.       }
  428.       return result_childs;
  429.    };
  430.    o.allChilds = function()
  431.    {
  432.       if(_root.allChilds_root_movieclip == null)
  433.       {
  434.          _root.allChilds_root_movieclip = this;
  435.       }
  436.       this.allChilds_tested = true;
  437.       var result_allChilds = new Array();
  438.       for(var v in this)
  439.       {
  440.          if(typeof this[v] == "movieclip")
  441.          {
  442.             if(this[v].allChilds_tested || this[v]._parent != this)
  443.             {
  444.                continue;
  445.             }
  446.             result_allChilds.push(this[v]);
  447.             result_allChilds = result_allChilds.concat(this[v].allChilds());
  448.          }
  449.       }
  450.       if(_root.allChilds_root_movieclip == this)
  451.       {
  452.          var allChilds_i = 0;
  453.          while(allChilds_i < result_allChilds.length)
  454.          {
  455.             delete result_allChilds[allChilds_i].allChilds_tested;
  456.             allChilds_i++;
  457.          }
  458.          delete _root.allChilds_root_movieclip;
  459.          delete allChilds_tested;
  460.       }
  461.       return result_allChilds;
  462.    };
  463.    o.copy = function(fromClip, paramArray)
  464.    {
  465.       if(paramArray == null)
  466.       {
  467.          paramArray = new Array("_width","_height","_x","_y","_alpha");
  468.       }
  469.       var rotation_fromClip = fromClip._rotation;
  470.       fromClip._rotation = 0;
  471.       var rotation_thisClip = this._rotation;
  472.       this._rotation = 0;
  473.       var copy_a = 0;
  474.       while(copy_a < paramArray.length)
  475.       {
  476.          this[paramArray[copy_a]] = fromClip[paramArray[copy_a]];
  477.          copy_a++;
  478.       }
  479.       fromClip._rotation = rotation_fromClip;
  480.       this._rotation = rotation_fromClip;
  481.    };
  482.    o.copyColor = function(fromClip)
  483.    {
  484.       new Color(this).setTransform(new Color(fromClip).getTransform());
  485.    };
  486.    o.top = function()
  487.    {
  488.       if(this._parent != _root)
  489.       {
  490.          return this._parent.top();
  491.       }
  492.       return this;
  493.    };
  494.    o.AnimToPlace = function(StartA, FinishA, Steps, CurrStep, XY)
  495.    {
  496.       this[XY] = Math.inOut(StartA,FinishA,Steps,CurrStep);
  497.    };
  498.    o.newSound = function(id, volume, loop)
  499.    {
  500.       this.mySound = new Sound();
  501.       this.mySound.attachSound(id);
  502.       this.mySound.setVolume(volume || 100);
  503.       this.mySound.start(0,loop || 1);
  504.    };
  505.    o.stopSound = function(id, volume, loop)
  506.    {
  507.       this.mySound.stop();
  508.    };
  509.    o.localToLocal = function(fromMc)
  510.    {
  511.       fromMc.localToGlobal(arguments[1]);
  512.       this.globalToLocal(arguments[1]);
  513.    };
  514.    o.align = function(fromClip)
  515.    {
  516.       var b = this.getBounds(fromClip || this._parent);
  517.       if(arguments[1] != "v")
  518.       {
  519.          this._x -= (b.xMin + b.xMax) / 2;
  520.       }
  521.       if(arguments[1] != "h")
  522.       {
  523.          this._y -= (b.yMin + b.yMax) / 2;
  524.       }
  525.    };
  526.    o.alignH = function(fromClip)
  527.    {
  528.       this.align(fromClip || this._parent,"h");
  529.    };
  530.    o.alignV = function(fromClip)
  531.    {
  532.       this.align(fromClip || this._parent,"v");
  533.    };
  534.    o.setParam = function()
  535.    {
  536.       this[arguments[0]] = arguments[1];
  537.    };
  538.    o.addProperty("_brightness",function()
  539.    {
  540.    }
  541.    ,function(br)
  542.    {
  543.       var b;
  544.       var c;
  545.       if(br <= 0)
  546.       {
  547.          b = 100 + br;
  548.          c = 0;
  549.       }
  550.       else
  551.       {
  552.          b = 100 - br;
  553.          c = Math.round(br / 100 * 255);
  554.       }
  555.       new Color(this).setTransform({ra:b,rb:c,ga:b,gb:c,ba:b,bb:c,aa:100,ab:0});
  556.    }
  557.    );
  558.    o.pauseInit = function()
  559.    {
  560.       var o = MovieClip.prototype;
  561.       o.played = true;
  562.       o.old_play = o.play;
  563.       o.play = function()
  564.       {
  565.          if(this.pause_local_flag)
  566.          {
  567.             return undefined;
  568.          }
  569.          this.played = true;
  570.          this.old_play();
  571.       };
  572.       o.old_gotoAndPlay = o.gotoAndPlay;
  573.       o.gotoAndPlay = function()
  574.       {
  575.          if(this.pause_local_flag)
  576.          {
  577.             return undefined;
  578.          }
  579.          this.gotoAndPlayed = true;
  580.          this.old_gotoAndPlay(arguments[0],arguments[1]);
  581.       };
  582.       o.old_stop = o.stop;
  583.       o.stop = function()
  584.       {
  585.          this.played = false;
  586.          this.old_stop();
  587.       };
  588.       o.old_gotoAndStop = o.gotoAndStop;
  589.       o.gotoAndStop = function()
  590.       {
  591.          this.played = false;
  592.          this.old_gotoAndStop(arguments[0],arguments[1]);
  593.       };
  594.       o.old_prevFrame = o.prevFrame;
  595.       o.prevFrame = function()
  596.       {
  597.          this.played = false;
  598.          this.old_prevFrame();
  599.       };
  600.       o.old_nextFrame = o.nextFrame;
  601.       o.nextFrame = function()
  602.       {
  603.          this.played = false;
  604.          this.old_nextFrame();
  605.       };
  606.       o.pauseInited = true;
  607.       o.paramHide();
  608.    };
  609.    o.pause = function(action)
  610.    {
  611.       if(!this.pauseInited)
  612.       {
  613.          this.pauseInit();
  614.       }
  615.       var action = action.toLowerCase();
  616.       if(this.paused_mc_array != undefined && action != "stop")
  617.       {
  618.          delete this.pause_flag;
  619.          var i = 0;
  620.          while(i < this.paused_mc_array.length)
  621.          {
  622.             delete this.paused_mc_array[i].pause_local_flag;
  623.             this.paused_mc_array[i].play();
  624.             i++;
  625.          }
  626.          delete this.paused_mc_array;
  627.       }
  628.       else if(this.paused_mc_array == undefined && action != "play")
  629.       {
  630.          var pause_array = this.allChilds();
  631.          pause_array.push(this);
  632.          this.paused_mc_array = new Array();
  633.          var i = 0;
  634.          while(i < pause_array.length)
  635.          {
  636.             if(pause_array[i].played && pause_array[i]._totalframes != 1)
  637.             {
  638.                pause_array[i].stop();
  639.                this.paused_mc_array.push(pause_array[i]);
  640.                pause_array[i].pause_local_flag = true;
  641.             }
  642.             i++;
  643.          }
  644.       }
  645.    };
  646.    o.creatRound = function(name, depth, radius, color)
  647.    {
  648.       var r = this.createEmptyMovieClip(name,depth);
  649.       radius = radius / 2 || 2;
  650.       r.lineStyle(radius,color || 0,100);
  651.       r.lineTo(0,0.15);
  652.       return r;
  653.    };
  654.    o.creatSqv = function(name, depth, width, color, center)
  655.    {
  656.       var sqv = this.createEmptyMovieClip(name,depth);
  657.       width = width || 1;
  658.       var s = 0;
  659.       if(center)
  660.       {
  661.          s = (- width) / 2;
  662.       }
  663.       sqv.moveTo(s,s);
  664.       sqv.beginFill(color || 0);
  665.       sqv.lineTo(width + s,s);
  666.       sqv.lineTo(width + s,width + s);
  667.       sqv.lineTo(s,width + s);
  668.       sqv.lineTo(s,s);
  669.       sqv.endFill();
  670.       return sqv;
  671.    };
  672.    o.setPixel = function()
  673.    {
  674.       var o = this.localToGlobal({x:this._x,y:this._y});
  675.       this._x -= o.x % 1;
  676.       this._y -= o.y % 1;
  677.    };
  678.    o.addProperty("_gXscale",function()
  679.    {
  680.       return this._xscale * (this._parent != undefined && (arguments.callee.apply(this._parent) || 100) / 100);
  681.    }
  682.    ,function(newVal)
  683.    {
  684.       var o = this;
  685.       var s = this._xscale;
  686.       while(o = o._parent)
  687.       {
  688.          s *= o._xscale / 100;
  689.       }
  690.       newVal /= s;
  691.       this._xscale = newVal * 100;
  692.    }
  693.    );
  694.    o.addProperty("_gYscale",function()
  695.    {
  696.       return this._yscale * (this._parent != undefined && (arguments.callee.apply(this._parent) || 100) / 100);
  697.    }
  698.    ,function(newVal)
  699.    {
  700.       var o = this;
  701.       var s = this._yscale;
  702.       while(o = o._parent)
  703.       {
  704.          s *= o._yscale / 100;
  705.       }
  706.       newVal /= s;
  707.       this._yscale = newVal * 100;
  708.    }
  709.    );
  710.    o.paramHide();
  711.    var o = String.prototype;
  712.    o.scrollBy = function(scrOffset)
  713.    {
  714.       var newScroll = this.scroll + scrOffset;
  715.       if(newScroll > this.maxscroll)
  716.       {
  717.          newScroll = this.maxscroll;
  718.       }
  719.       else if(newScroll < 1)
  720.       {
  721.          newScroll = 1;
  722.       }
  723.       this.scroll = newScroll;
  724.    };
  725.    o.dZero = function()
  726.    {
  727.       return Number(this).dZero();
  728.    };
  729.    o.paramHide();
  730.    var o = XMLNode.prototype;
  731.    XML.prototype.ignoreWhite = true;
  732.    o.attr = o.firstChild.attributes;
  733.    o.byName = function(node_name)
  734.    {
  735.       return this.search("nodeName",node_name);
  736.    };
  737.    o.search = function(param, value)
  738.    {
  739.       if(value != undefined && (this[param] == value || this.attributes[param] == value))
  740.       {
  741.          return this;
  742.       }
  743.       if(value == undefined && this.attributes[param] != undefined)
  744.       {
  745.          return this;
  746.       }
  747.       return this.nextSibling.search(param,value) || this.firstChild.search(param,value);
  748.    };
  749.    o.searchValue = function(value)
  750.    {
  751.       var a = this.attributes;
  752.       for(var v in a)
  753.       {
  754.          if(a[v] == value)
  755.          {
  756.             return this;
  757.          }
  758.       }
  759.       return this.nextSibling.searchValue(value) || this.firstChild.searchValue(value);
  760.    };
  761.    o.clear = function()
  762.    {
  763.       this.nextSibling.clear();
  764.       this.firstChild.clear();
  765.       if(this.nodeType == 3 && this.parentNode.firstChild != this.parentNode.lastChild)
  766.       {
  767.          this.removeNode();
  768.       }
  769.    };
  770.    o.paramHide();
  771.    var o = Math;
  772.    o.ease = function(Steps, CurrStep)
  773.    {
  774.       if(Steps <= CurrStep)
  775.       {
  776.          return 0;
  777.       }
  778.       if(Steps / 2 == CurrStep)
  779.       {
  780.          return 1;
  781.       }
  782.       var result = Math.sin(CurrStep / Steps * 180 * 3.141592653589793 / 180);
  783.       return result * result * result;
  784.    };
  785.    o.inOut = function(StartA, FinishA, Steps, CurrStep)
  786.    {
  787.       if(CurrStep >= Steps)
  788.       {
  789.          return FinishA;
  790.       }
  791.       if(CurrStep <= 0)
  792.       {
  793.          return StartA;
  794.       }
  795.       return StartA + (FinishA - StartA) * Math.ease(Steps * 2,CurrStep);
  796.    };
  797.    o.length = function(point1, point2)
  798.    {
  799.       var catet1 = this.abs(point1._x - point2._x);
  800.       var catet2 = this.abs(point1._y - point2._y);
  801.       return this.sqrt(this.pow(catet1,2) + this.pow(catet2,2));
  802.    };
  803.    o.getMiddlePoint = function(point1, point2, len)
  804.    {
  805.       var bigLen = this.length(point1,point2);
  806.       if(len == undefined)
  807.       {
  808.          len = bigLen / 2;
  809.       }
  810.       var c = bigLen / len;
  811.       var point = {};
  812.       point._x = point1._x + (point2._x - point1._x) / c;
  813.       point._y = point1._y + (point2._y - point1._y) / c;
  814.       return point;
  815.    };
  816.    o.getDeltaPoint = function(a_point, b_point, delta)
  817.    {
  818.       var rad = 57.29577951308232;
  819.       var c = this.length(a_point,b_point);
  820.       var b = this.length(a_point,delta);
  821.       var a = this.length(b_point,delta);
  822.       var angA = Math.round(Math.acos((b * b + c * c - a * a) / (2 * b * c)) * rad);
  823.       var angB = Math.round(Math.acos((a * a + c * c - b * b) / (2 * a * c)) * rad);
  824.       var angC = Math.round(Math.acos((a * a + b * b - c * c) / (2 * a * b)) * rad);
  825.       var ax = Math.round(b * Math.cos(angA / rad));
  826.       return this.getMiddlePoint(a_point,b_point,ax);
  827.    };
  828.    o.paramHide();
  829.    Stage.onCenterScale = function(w, h)
  830.    {
  831.       var o = {};
  832.       o.onResize = function()
  833.       {
  834.          var s = Stage;
  835.          var rootScale;
  836.          var tmp;
  837.          if(s.width <= 0)
  838.          {
  839.             return undefined;
  840.          }
  841.          s._xscale = s.width / w * 100;
  842.          s._yscale = s.height / h * 100;
  843.          tmp = rootScale = Math.min(s._xscale,s._yscale);
  844.          rootScale *= Stage._rootH / Stage.height;
  845.          if(rootScale > tmp)
  846.          {
  847.             rootScale = tmp;
  848.          }
  849.          _root._yscale = _root._xscale = rootScale;
  850.          _root._x = (w - w * (rootScale / 100)) / 2;
  851.          _root._y = (h - h * (rootScale / 100)) / 2;
  852.          C_AltCLASS.prototype.scale = 100 / rootScale * 100;
  853.       };
  854.       o.onKeyDown = function()
  855.       {
  856.          if(getTimer() - this.downTimer > 300)
  857.          {
  858.             var c = Key.getCode();
  859.             if(c == 187 || c == 107)
  860.             {
  861.                Stage.zoomIn();
  862.             }
  863.             else if(c == 189 || c == 109)
  864.             {
  865.                Stage.zoomOut();
  866.             }
  867.             this.downTimer = getTimer();
  868.          }
  869.       };
  870.       o.onKeyUp = function()
  871.       {
  872.          this.downTimer = 0;
  873.       };
  874.       this.zoomIn = function()
  875.       {
  876.          this._rootH = Math.round(this._rootH * 1.1);
  877.          if(this._rootH > this.height)
  878.          {
  879.             this._rootH = this.height;
  880.          }
  881.          this.saveRootParams();
  882.          Stage.broadcastMessage("onResize");
  883.       };
  884.       this.zoomOut = function()
  885.       {
  886.          if(this._rootH > this.height)
  887.          {
  888.             this._rootH = this.height;
  889.          }
  890.          this._rootH = Math.round(this._rootH / 1.1);
  891.          if(this._rootH < 100)
  892.          {
  893.             this._rootH = 100;
  894.          }
  895.          Stage.saveRootParams();
  896.          Stage.broadcastMessage("onResize");
  897.       };
  898.       this.saveRootParams = function()
  899.       {
  900.          this.so.data._rootH = this._rootH;
  901.          this.so.flush();
  902.       };
  903.       this.so = SharedObject.getLocal("stage");
  904.       if(this.so.data._rootH)
  905.       {
  906.          this._rootH = this.so.data._rootH;
  907.       }
  908.       else
  909.       {
  910.          this._rootH = this.height * 10;
  911.       }
  912.       Stage.centerScaleMode = true;
  913.       Stage._xscale = 100;
  914.       Stage._yscale = 100;
  915.       Stage.scaleMode = "noScale";
  916.       Stage.addListener(o);
  917.       Key.addListener(o);
  918.       Stage.broadcastMessage("onResize");
  919.    };
  920.    stg.paramHide();
  921.    stg = null;
  922.    delete arr;
  923.    var o = Number.prototype;
  924.    o.dZero = function()
  925.    {
  926.       if(this == 0)
  927.       {
  928.          return "0.00";
  929.       }
  930.       var dStr = String(Math.floor(this * 100));
  931.       var one = dStr.substr(0,dStr.length - 2);
  932.       if(one == "")
  933.       {
  934.          one = "0";
  935.       }
  936.       var two = dStr.substr(-2);
  937.       if(two == "0")
  938.       {
  939.          two = "00";
  940.       }
  941.       var arr_tmp = [];
  942.       var str_tmp = one;
  943.       while(str_tmp != "")
  944.       {
  945.          if(str_tmp.length < 3)
  946.          {
  947.             arr_tmp.unshift(str_tmp);
  948.             break;
  949.          }
  950.          arr_tmp.unshift(str_tmp.substr(-3));
  951.          str_tmp = str_tmp.substr(0,str_tmp.length - 3);
  952.       }
  953.       one = arr_tmp.join(",");
  954.       return one + "." + two;
  955.    };
  956.    o.paramHide();
  957.    var o = Button.prototype;
  958.    o.addProperty("_brightness",function()
  959.    {
  960.    }
  961.    ,function(br)
  962.    {
  963.       var b;
  964.       var c;
  965.       if(br <= 0)
  966.       {
  967.          b = 100 + br;
  968.          c = 0;
  969.       }
  970.       else
  971.       {
  972.          b = 100 - br;
  973.          c = Math.round(br / 100 * 255);
  974.       }
  975.       new Color(this).setTransform({ra:b,rb:c,ga:b,gb:c,ba:b,bb:c,aa:100,ab:0});
  976.    }
  977.    );
  978.    o.paramHide();
  979.    _global.isXML = function(x)
  980.    {
  981.       return x instanceof XML || x instanceof XMLNode;
  982.    };
  983.    _global.c__ = {};
  984.    c__[1] = function()
  985.    {
  986.       Conv.include.apply(Conv,arguments);
  987.    };
  988.    c__[2] = function()
  989.    {
  990.       Conv.put.apply(Conv,arguments);
  991.    };
  992.    c__[3] = function()
  993.    {
  994.       Conv.anim.apply(Conv,arguments);
  995.    };
  996.    ASSetPropFlags(_global,"isXML,c__",131);
  997.    _global.C_ConveyorCLASS = function()
  998.    {
  999.       this.init();
  1000.    };
  1001.    C_ConveyorCLASS.prototype.init = function()
  1002.    {
  1003.       if(!_root.anim_depth)
  1004.       {
  1005.          _global.anim_depth = _root.createEmptyMovieClip("anim_depth",15400);
  1006.       }
  1007.       this.aConveyor = new Array();
  1008.       this.bConveyor = new Array();
  1009.       this.conveyorON = true;
  1010.       this.bookmark = 0;
  1011.       this.shorts = 0;
  1012.       this.turbo = false;
  1013.       this.noSound = false;
  1014.       _root.createEmptyMovieClip("ConvTimer",-9122);
  1015.       _root.ConvTimer.onEnterFrame = function()
  1016.       {
  1017.          if(this.sleep)
  1018.          {
  1019.             return undefined;
  1020.          }
  1021.          this.nTime = this.nTime + 1;
  1022.          if(this.nTime >= this.timeOut)
  1023.          {
  1024.             Conv[1]();
  1025.          }
  1026.       };
  1027.       this[1]();
  1028.    };
  1029.    C_ConveyorCLASS.prototype.play = function()
  1030.    {
  1031.       if(this.conveyorON)
  1032.       {
  1033.          return undefined;
  1034.       }
  1035.       if(this.frame)
  1036.       {
  1037.          _root.ConvTimer.sleep = false;
  1038.       }
  1039.       this.aConveyor = this.aConveyor.concat(this.bConveyor);
  1040.       this.bConveyor = new Array();
  1041.       this.conveyorON = true;
  1042.    };
  1043.    C_ConveyorCLASS.prototype.stop = function()
  1044.    {
  1045.       if(this.frame)
  1046.       {
  1047.          _root.ConvTimer.sleep = true;
  1048.       }
  1049.       this.conveyorON = false;
  1050.    };
  1051.    C_ConveyorCLASS.prototype.put = function()
  1052.    {
  1053.       if(this.noSound && arguments[1] == "newSound")
  1054.       {
  1055.          return undefined;
  1056.       }
  1057.       var tmp_array = [];
  1058.       var i = 0;
  1059.       while(i < arguments.length)
  1060.       {
  1061.          tmp_array.push(arguments[i]);
  1062.          i++;
  1063.       }
  1064.       if(this.conveyorON)
  1065.       {
  1066.          this.aConveyor.push(tmp_array);
  1067.          if(!this.bookmark && this.aConveyor.length > 200 + this.shorts)
  1068.          {
  1069.             var tmp_arr = this.aConveyor.splice(100 + this.shorts);
  1070.             this.shorts = this.shorts + 1;
  1071.             this.put(function()
  1072.             {
  1073.                Conv.aConveyor = arguments[0].concat(Conv.aConveyor);
  1074.                Conv.shorts--;
  1075.             }
  1076.             ,0,tmp_arr);
  1077.          }
  1078.       }
  1079.       else
  1080.       {
  1081.          this.bConveyor.push(tmp_array);
  1082.       }
  1083.    };
  1084.    C_ConveyorCLASS.prototype.include = function()
  1085.    {
  1086.       this.put(this,3,0);
  1087.       var tmp_array = [];
  1088.       var i = 0;
  1089.       while(i < arguments.length)
  1090.       {
  1091.          tmp_array.push(arguments[i]);
  1092.          i++;
  1093.       }
  1094.       if(this.conveyorON)
  1095.       {
  1096.          this.aConveyor.push(tmp_array);
  1097.       }
  1098.       else
  1099.       {
  1100.          this.bConveyor.push(tmp_array);
  1101.       }
  1102.       this.put(this,2,0);
  1103.    };
  1104.    C_ConveyorCLASS.prototype.put_a = function()
  1105.    {
  1106.       this.aConveyor.push(arguments);
  1107.    };
  1108.    C_ConveyorCLASS.prototype.anim = function(mc_anim, mc_to, params_ob)
  1109.    {
  1110.       var to_end = params_ob.to_end * 1;
  1111.       var speed = params_ob.speed || 20;
  1112.       var acsel = params_ob.acsel * 1 || 1;
  1113.       var scale = params_ob.scale;
  1114.       var x_f = params_ob.xy.x || mc_to._x;
  1115.       var y_f = params_ob.xy.y || mc_to._y;
  1116.       var delta = params_ob.delta;
  1117.       if(!mc_to)
  1118.       {
  1119.          mc_to = {_x:x_f,_y:y_f};
  1120.       }
  1121.       var x;
  1122.       var y;
  1123.       var x_s;
  1124.       var y_s;
  1125.       var x_st = mc_anim._x;
  1126.       var y_st = mc_anim._y;
  1127.       if(scale)
  1128.       {
  1129.          var scale_x = mc_anim._xscale;
  1130.          var scale_y = mc_anim._yscale;
  1131.          var scale_to_x = mc_to._xscale;
  1132.          var scale_to_y = mc_to._yscale;
  1133.       }
  1134.       this.put(mc_anim,"swapDepths",0,_root.anim_depth);
  1135.       this.put(_root,"newSound",0,"movie",50);
  1136.       var pathLength = Math.length(mc_anim,mc_to);
  1137.       var nSteps = Math.round(pathLength / speed / acsel);
  1138.       if(isNaN(nSteps))
  1139.       {
  1140.          return undefined;
  1141.       }
  1142.       if(nSteps < 3)
  1143.       {
  1144.          nSteps = 3;
  1145.       }
  1146.       var i = 1;
  1147.       while(i <= nSteps)
  1148.       {
  1149.          if(!to_end && i >= nSteps - nSteps / 5)
  1150.          {
  1151.             break;
  1152.          }
  1153.          if(this.turbo)
  1154.          {
  1155.             i = !to_end ? nSteps - nSteps / 5 : nSteps;
  1156.          }
  1157.          if(scale)
  1158.          {
  1159.             x_s = Math.inOut(scale_x,scale_to_x,nSteps,i);
  1160.             y_s = Math.inOut(scale_y,scale_to_y,nSteps,i);
  1161.             this.put(mc_anim,"scaleTo",0,x_s,y_s);
  1162.          }
  1163.          x = Math.inOut(x_st,x_f,nSteps,i);
  1164.          y = Math.inOut(y_st,y_f,nSteps,i);
  1165.          this.put(mc_anim,"movieTo","1",x,y);
  1166.          i++;
  1167.       }
  1168.       this.put(mc_anim,"swapDepths","1",_root.anim_depth);
  1169.    };
  1170.    C_ConveyorCLASS.prototype.turbo_On = function()
  1171.    {
  1172.       this.turbo = true;
  1173.    };
  1174.    C_ConveyorCLASS.prototype.turbo_Off = function()
  1175.    {
  1176.       this.turbo = false;
  1177.    };
  1178.    var a = [function(pause)
  1179.    {
  1180.       this.aConveyor = [[function()
  1181.       {
  1182.       },pause]].concat(this.aConveyor);
  1183.    },function()
  1184.    {
  1185.       if(!this.conveyorON)
  1186.       {
  1187.          this[0](500);
  1188.       }
  1189.       var cTime;
  1190.       var tA = this.aConveyor[0];
  1191.       if(this.aConveyor.length == 0)
  1192.       {
  1193.          cTime = "1";
  1194.       }
  1195.       else
  1196.       {
  1197.          this.aConveyor.shift();
  1198.          var calledFunction;
  1199.          var calledObject = _root;
  1200.          var argumentsObject;
  1201.          if(typeof tA[0] != "function")
  1202.          {
  1203.             if(typeof tA[0] == "string")
  1204.             {
  1205.                calledObject = eval(tA[0]);
  1206.             }
  1207.             else
  1208.             {
  1209.                calledObject = tA[0];
  1210.             }
  1211.             cTime = tA[2];
  1212.             calledFunction = calledObject[tA[1]];
  1213.             argumentsObject = tA.slice(3);
  1214.          }
  1215.          else
  1216.          {
  1217.             cTime = tA[1];
  1218.             calledFunction = tA[0];
  1219.             argumentsObject = tA.slice(2);
  1220.          }
  1221.          calledFunction.apply(calledObject,argumentsObject);
  1222.       }
  1223.       clearInterval(this.interval);
  1224.       if(cTime != 0)
  1225.       {
  1226.          var timeType = typeof cTime;
  1227.          var timeValue = Number(cTime);
  1228.          if(timeType == "string")
  1229.          {
  1230.             _root.ConvTimer.sleep = false;
  1231.             if(this.turbo)
  1232.             {
  1233.                timeValue = 1;
  1234.             }
  1235.             _root.ConvTimer.timeOut = timeValue;
  1236.             _root.ConvTimer.nTime = 0;
  1237.             this.frame = true;
  1238.          }
  1239.          else if(timeType == "number")
  1240.          {
  1241.             _root.ConvTimer.sleep = true;
  1242.             this.interval = setInterval(this,1,timeValue);
  1243.             this.frame = false;
  1244.          }
  1245.          else
  1246.          {
  1247.             this[1]();
  1248.          }
  1249.       }
  1250.       else
  1251.       {
  1252.          this[1]();
  1253.       }
  1254.    },function(rev)
  1255.    {
  1256.       if(this.bookmark <= 0)
  1257.       {
  1258.          return undefined;
  1259.       }
  1260.       this.bookmark--;
  1261.       var n = this.aConveyor.length;
  1262.       var tmp_array = [];
  1263.       while(this.aConveyor[this.aConveyor.length - 1] != "#bookmark#" && n-- > 0)
  1264.       {
  1265.          tmp_array.push(this.aConveyor.pop());
  1266.       }
  1267.       this.aConveyor.pop();
  1268.       if(!rev)
  1269.       {
  1270.          tmp_array.reverse();
  1271.       }
  1272.       this.aConveyor = tmp_array.concat(this.aConveyor);
  1273.    },function()
  1274.    {
  1275.       this.aConveyor.push("#bookmark#");
  1276.       this.bookmark = this.bookmark + 1;
  1277.    }];
  1278.    var i = 0;
  1279.    while(i < a.length)
  1280.    {
  1281.       C_ConveyorCLASS.prototype[i] = a[i];
  1282.       i++;
  1283.    }
  1284.    delete a;
  1285.    delete i;
  1286.    _global.empty = function()
  1287.    {
  1288.    };
  1289.    _global.Conv = new C_ConveyorCLASS();
  1290.    ASSetPropFlags(_global,"Conv,empty,anim_depth,addConveyor",131);
  1291.    ASSetPropFlags(_global,"C_ConveyorCLASS",131);
  1292.    _global.Image = function(uri, mc)
  1293.    {
  1294.       this._targetMovie = mc;
  1295.       this.data = new XML();
  1296.       this.data.owner = this;
  1297.       if(uri != undefined)
  1298.       {
  1299.          this.tmp_interval = setInterval(this,"load",20,uri);
  1300.       }
  1301.    };
  1302.    Image.prototype.load = function(uri, mc)
  1303.    {
  1304.       clearInterval(this.tmp_interval);
  1305.       this._targetMovie = mc || this._targetMovie;
  1306.       this._uri = uri;
  1307.       this.data.onLoad = function(success)
  1308.       {
  1309.          var o = this.owner;
  1310.          o._trace();
  1311.          o.onLoad(success);
  1312.          o.close();
  1313.       };
  1314.       this._traceID = setInterval(this,"_trace",50);
  1315.       this.data.load(uri);
  1316.    };
  1317.    Image.prototype.close = function(uri, mc)
  1318.    {
  1319.       clearInterval(this._traceID);
  1320.    };
  1321.    Image.prototype.getBytesLoaded = function()
  1322.    {
  1323.       return this.data.getBytesLoaded();
  1324.    };
  1325.    Image.prototype.getBytesTotal = function()
  1326.    {
  1327.       return this.data.getBytesTotal();
  1328.    };
  1329.    Image.prototype._trace = function()
  1330.    {
  1331.       if(this.getBytesTotal() <= 0)
  1332.       {
  1333.          return undefined;
  1334.       }
  1335.       this.percent = Math.floor(this.getBytesLoaded() / this.getBytesTotal() * 10000) / 100;
  1336.       this.trace();
  1337.    };
  1338.    Image.prototype.trace = function()
  1339.    {
  1340.    };
  1341.    Image.prototype.onLoad = function(success)
  1342.    {
  1343.       if(success)
  1344.       {
  1345.          if(this._targetMovie)
  1346.          {
  1347.             this._targetMovie.loadMovie(this._uri);
  1348.          }
  1349.       }
  1350.    };
  1351.    Image.prototype.addProperty("src",function()
  1352.    {
  1353.       return this._uri;
  1354.    }
  1355.    ,Image.prototype.load);
  1356.    ASSetPropFlags(_global,"Image",131);
  1357.    _global.Preloader = function()
  1358.    {
  1359.       this.items = [];
  1360.       var i = 0;
  1361.       while(i < arguments.length)
  1362.       {
  1363.          this.addItem(arguments[i]);
  1364.          i++;
  1365.       }
  1366.    };
  1367.    Preloader.prototype.addItem = function()
  1368.    {
  1369.       var o;
  1370.       var a;
  1371.       if(arguments[0] instanceof Array)
  1372.       {
  1373.          a = arguments[0];
  1374.       }
  1375.       else
  1376.       {
  1377.          a = arguments;
  1378.       }
  1379.       var i = 0;
  1380.       while(i < a.length)
  1381.       {
  1382.          o = new Image();
  1383.          o.owner = this;
  1384.          o.onLoad = function(s)
  1385.          {
  1386.             this.owner.onItemLoaded(s);
  1387.          };
  1388.          this.items.push([o,a[i]]);
  1389.          this.loadInited = true;
  1390.          i++;
  1391.       }
  1392.       if(!this.curentLoad)
  1393.       {
  1394.          this.onItemLoaded();
  1395.       }
  1396.       return o;
  1397.    };
  1398.    Preloader.prototype.onItemLoaded = function(success)
  1399.    {
  1400.       var o = this.curentLoad = this.items.shift();
  1401.       if(this.curentLoad)
  1402.       {
  1403.          o[0].load(o[1]);
  1404.       }
  1405.       else if(this.loadInited)
  1406.       {
  1407.          this.onLoad();
  1408.       }
  1409.    };
  1410.    Preloader.prototype.onLoad = function()
  1411.    {
  1412.       this.trace("Loading Complette");
  1413.    };
  1414.    ASSetPropFlags(_global,"Preloader",131);
  1415.    var mc = MovieClip.prototype;
  1416.    var btn = Button.prototype;
  1417.    var text = TextField.prototype;
  1418.    Stage.initElastic = function(w, h, min_w, min_h)
  1419.    {
  1420.       if(this.elsticParams != undefined)
  1421.       {
  1422.          return false;
  1423.       }
  1424.       this.scaleMode = "noScale";
  1425.       this.align = "TL";
  1426.       this.elsticParams = {};
  1427.       this.elsticParams.min_h = min_h || h;
  1428.       this.elsticParams.min_w = min_w || w;
  1429.       this.elsticParams.width = w;
  1430.       this.elsticParams.height = h;
  1431.       this.elsticParams.onResize = function()
  1432.       {
  1433.          var o = Stage;
  1434.          if(o.width <= 0 || o.height <= 0)
  1435.          {
  1436.             this.lock = true;
  1437.             return undefined;
  1438.          }
  1439.          this.lock = false;
  1440.          var w = o.width >= this.min_w ? o.width : this.min_w;
  1441.          var h = o.height >= this.min_h ? o.height : this.min_h;
  1442.          this.w_d = Math.floor(w) - this.width;
  1443.          this.h_d = Math.floor(h) - this.height;
  1444.          this.width = w;
  1445.          this.height = h;
  1446.          return true;
  1447.       };
  1448.       this.addListener(this.elsticParams);
  1449.    };
  1450.    Stage.deleteElastic = function()
  1451.    {
  1452.       this.removeListener(this.elsticParams);
  1453.       delete this.elsticParams;
  1454.    };
  1455.    mc.registerElastic = btn.registerElastic = text.registerElastic = function()
  1456.    {
  1457.       var o = Stage.elsticParams;
  1458.       if(o == undefined)
  1459.       {
  1460.          return false;
  1461.       }
  1462.       this.onResize = function()
  1463.       {
  1464.          var o = Stage.elsticParams;
  1465.          if(o.lock)
  1466.          {
  1467.             return undefined;
  1468.          }
  1469.          var actions = arguments.callee.actions;
  1470.          var value;
  1471.          var i = 0;
  1472.          while(i < actions.length)
  1473.          {
  1474.             this[actions[i][1]] += o[actions[i][0]];
  1475.             i++;
  1476.          }
  1477.       };
  1478.       var a = this.onResize.actions = [];
  1479.       var params = {};
  1480.       params.x = ["w_d","_x"];
  1481.       params.w = ["w_d","_width"];
  1482.       params.y = ["h_d","_y"];
  1483.       params.h = ["h_d","_height"];
  1484.       var i = 0;
  1485.       while(i < arguments.length)
  1486.       {
  1487.          a.push(params[arguments[i]]);
  1488.          i++;
  1489.       }
  1490.       Stage.addListener(this);
  1491.       return true;
  1492.    };
  1493.    mc.registerInterfaceElastic = function()
  1494.    {
  1495.       this.onResize = function()
  1496.       {
  1497.          var o = Stage.elsticParams;
  1498.          if(o.lock)
  1499.          {
  1500.             return undefined;
  1501.          }
  1502.          var actions = arguments.callee.actions;
  1503.          var value;
  1504.          var ┬ºinterface┬º = arguments.callee["interface"];
  1505.          var args = [];
  1506.          var i = 0;
  1507.          while(i < actions.length)
  1508.          {
  1509.             this[actions[i][1]] += o[actions[i][0]];
  1510.             i++;
  1511.          }
  1512.          if(eval("interface").w)
  1513.          {
  1514.             args.push(this.width + o.w_d);
  1515.          }
  1516.          else if(eval("interface").w_l)
  1517.          {
  1518.             args.push(this.width);
  1519.          }
  1520.          if(eval("interface").h)
  1521.          {
  1522.             args.push(this.height + o.h_d);
  1523.          }
  1524.          else if(eval("interface").h_l)
  1525.          {
  1526.             args.push(this.height);
  1527.          }
  1528.          this.setSize.apply(this,args);
  1529.       };
  1530.       var a = this.onResize.actions = [];
  1531.       var ┬ºinterface┬º = this.onResize["interface"] = {};
  1532.       var params = {};
  1533.       params.x = ["w_d","_x"];
  1534.       params.y = ["h_d","_y"];
  1535.       var i = 0;
  1536.       while(i < arguments.length)
  1537.       {
  1538.          if(params[arguments[i]])
  1539.          {
  1540.             a.push(params[arguments[i]]);
  1541.          }
  1542.          else
  1543.          {
  1544.             eval("interface")[arguments[i]] = true;
  1545.          }
  1546.          i++;
  1547.       }
  1548.       Stage.addListener(this);
  1549.       return true;
  1550.    };
  1551.    mc.unregisterElastic = btn.unregisterElastic = text.unregisterElastic = function()
  1552.    {
  1553.       Stage.removeListener(this);
  1554.       delete this.onResize;
  1555.    };
  1556.    mc.paramHide();
  1557.    btn.paramHide();
  1558.    text.paramHide();
  1559.    delete mc;
  1560.    delete btn;
  1561.    delete text;
  1562.    _global.C_AltCLASS = function(text, owner)
  1563.    {
  1564.       this.owner = owner;
  1565.       this.init();
  1566.       this[2](text);
  1567.    };
  1568.    C_AltCLASS.prototype = new Object();
  1569.    C_AltCLASS.prototype.counter = 0;
  1570.    C_AltCLASS.prototype.depth = 23499;
  1571.    C_AltCLASS.prototype.fill = 16777164;
  1572.    C_AltCLASS.prototype.lineColor = 0;
  1573.    C_AltCLASS.prototype.align = "BL";
  1574.    C_AltCLASS.prototype.scale = 100;
  1575.    var o = C_AltCLASS.prototype.textFormat = new TextFormat();
  1576.    o.font = "_sans";
  1577.    o.size = 10;
  1578.    o.textColor = 0;
  1579.    o.bold = true;
  1580.    o.indent = 0;
  1581.    delete o;
  1582.    C_AltCLASS.prototype.init = function()
  1583.    {
  1584.       Stage.addListener(this);
  1585.       Mouse.addListener(this);
  1586.       var o = this.closeListener = {};
  1587.       o.owner = this;
  1588.       o.onMouseDown = o.onKeyDown = o.onKeyUp = function()
  1589.       {
  1590.          var o = this.owner.owner;
  1591.          if(o)
  1592.          {
  1593.             o.hideAlt();
  1594.          }
  1595.          else
  1596.          {
  1597.             this.owner[3]();
  1598.          }
  1599.       };
  1600.       Key.addListener(o);
  1601.       Mouse.addListener(o);
  1602.    };
  1603.    C_AltCLASS.prototype.onMouseMove = function()
  1604.    {
  1605.       if(!this.owner.__alt)
  1606.       {
  1607.          this[3]();
  1608.          return undefined;
  1609.       }
  1610.       if(!this.point)
  1611.       {
  1612.          this.holder._x = _root._xmouse;
  1613.          this.holder._y = _root._ymouse;
  1614.       }
  1615.       else
  1616.       {
  1617.          this.holder._x = this.point._x;
  1618.          this.holder._y = this.point._y;
  1619.       }
  1620.       this.holder._xscale = this.holder._yscale = this.scale;
  1621.       var x = this.holder._x;
  1622.       var y = this.holder._y;
  1623.       var w = this.holder._width;
  1624.       var h = this.holder._height;
  1625.       var a = this.align;
  1626.       var v = "B";
  1627.       var g = "L";
  1628.       if(Stage.centerScaleMode)
  1629.       {
  1630.          if(y - h < 0)
  1631.          {
  1632.             v = "T";
  1633.          }
  1634.          if(x + w > Stage.width / (Stage._xscale / 100))
  1635.          {
  1636.             g = "R";
  1637.          }
  1638.       }
  1639.       else
  1640.       {
  1641.          if(Stage.height > 0 && h > y)
  1642.          {
  1643.             v = "T";
  1644.          }
  1645.          if(Stage.width > 0 && Stage.width - w < x)
  1646.          {
  1647.             g = "R";
  1648.          }
  1649.       }
  1650.       this.align = v + g;
  1651.       if(this.align != a)
  1652.       {
  1653.          this[4]();
  1654.       }
  1655.    };
  1656.    var a = [function()
  1657.    {
  1658.       this.onMouseMove();
  1659.    },function()
  1660.    {
  1661.       var o = this.holder;
  1662.       o._visible = true;
  1663.       var t = o.alt_txt;
  1664.       var w = t._width;
  1665.       var h = t._height;
  1666.       var x = o._xmouse;
  1667.       var y = o._ymouse;
  1668.       var b = this.border_mc = o.createEmptyMovieClip("border",2);
  1669.       b.beginFill(this.fill,100);
  1670.       b.lineStyle(0);
  1671.       b.lineTo(12,-12);
  1672.       b.lineTo(12 + w + 4,-12);
  1673.       b.lineTo(12 + w + 4,-12 - h - 4);
  1674.       b.lineTo(8,-12 - h - 4);
  1675.       b.lineTo(8,-19);
  1676.       b.endFill();
  1677.       var a = b.createEmptyMovieClip("aligner",1);
  1678.       b = this.shadow_mc = o.createEmptyMovieClip("shadow",1);
  1679.       b.beginFill(0,30);
  1680.       var d = 7;
  1681.       b.lineTo(12 + d,-12 + d);
  1682.       b.lineTo(12 + w + 4 + d,-12 + d);
  1683.       b.lineTo(12 + w + 4 + d,-12 - h - 4 + d);
  1684.       b.lineTo(8 + d,-12 - h - 4 + d);
  1685.       b.lineTo(8 + d,-19 + d);
  1686.       b.endFill();
  1687.       a.beginFill(this.fill);
  1688.       a.moveTo(12,-15);
  1689.       a.lineTo(12 + w,-15);
  1690.       a.lineTo(12 + w,-12 - h);
  1691.       a.lineTo(12,-12 - h);
  1692.       a.endFill();
  1693.       this[4]();
  1694.       this.onMouseMove();
  1695.    },function(text)
  1696.    {
  1697.       if(this.__proto__.curent)
  1698.       {
  1699.          this.__proto__.curent.owner.hideAlt();
  1700.       }
  1701.       this.__proto__.curent = this;
  1702.       var o = this.holder = _root.createEmptyMovieClip("alt_" + c + "_mc",this.depth);
  1703.       this.holder._xscale = this.holder._yscale = this.scale;
  1704.       o.owner = this;
  1705.       o.onEnterFrame = function()
  1706.       {
  1707.          delete this.onEnterFrame;
  1708.          this.owner[1]();
  1709.       };
  1710.       o._visible = false;
  1711.       o._x = _root._xmouse;
  1712.       o._y = _root._ymouse;
  1713.       o.createTextField("alt_txt",123,0,0,10,10);
  1714.       var t = o.alt_txt;
  1715.       t.border = false;
  1716.       t.multiline = true;
  1717.       t.autoSize = true;
  1718.       t.selectable = false;
  1719.       t.text = text;
  1720.       t.setTextFormat(this.textFormat);
  1721.    },function()
  1722.    {
  1723.       this.holder.removeMovieClip();
  1724.       Stage.removeListener(this);
  1725.       Mouse.removeListener(this);
  1726.       Key.removeListener(this.closeListener);
  1727.       Mouse.removeListener(this.closeListener);
  1728.    },function()
  1729.    {
  1730.       var o = this.holder;
  1731.       if(this.align == undefined)
  1732.       {
  1733.          this.align = "BL";
  1734.       }
  1735.       if(this.align == "BL")
  1736.       {
  1737.          o.border._xscale = o.shadow._xscale = 100;
  1738.          o.border._yscale = o.shadow._yscale = 100;
  1739.          o.shadow._x = o.shadow._y = 0;
  1740.       }
  1741.       else if(this.align == "BR")
  1742.       {
  1743.          o.border._xscale = o.shadow._xscale = -100;
  1744.          o.border._yscale = o.shadow._yscale = 100;
  1745.          o.shadow._x = 0;
  1746.          o.shadow._y = 0;
  1747.       }
  1748.       else if(this.align == "TL")
  1749.       {
  1750.          o.border._xscale = o.shadow._xscale = 100;
  1751.          o.border._yscale = o.shadow._yscale = -100;
  1752.          o.shadow._x = 0;
  1753.          o.shadow._y = 10;
  1754.       }
  1755.       else if(this.align == "TR")
  1756.       {
  1757.          o.border._xscale = o.shadow._xscale = -100;
  1758.          o.border._yscale = o.shadow._yscale = -100;
  1759.          o.shadow._x = 0;
  1760.          o.shadow._y = 10;
  1761.       }
  1762.       var p = o.border.aligner.getBounds(o);
  1763.       o.alt_txt._x = p.xMin;
  1764.       o.alt_txt._y = p.yMin - 2;
  1765.    }];
  1766.    var i = 0;
  1767.    while(i < a.length)
  1768.    {
  1769.       C_AltCLASS.prototype[i] = a[i];
  1770.       i++;
  1771.    }
  1772.    delete a;
  1773.    delete i;
  1774.    ASSetPropFlags(_global,"C_AltCLASS",131);
  1775.    Button.prototype.showAlt = MovieClip.prototype.showAlt = function(text)
  1776.    {
  1777.       if(this.__alt)
  1778.       {
  1779.          this.hideAlt();
  1780.       }
  1781.       this.__alt = new C_AltCLASS(text,this);
  1782.    };
  1783.    MovieClip.prototype.showAltInPoint = function(text, point)
  1784.    {
  1785.       if(this.__alt)
  1786.       {
  1787.          this.hideAlt();
  1788.       }
  1789.       var o = this.__alt = new C_AltCLASS(text,this);
  1790.       o.point = point;
  1791.    };
  1792.    Button.prototype.hideAlt = MovieClip.prototype.hideAlt = function()
  1793.    {
  1794.       this.__alt[3]();
  1795.       delete this.__alt;
  1796.    };
  1797.    Button.prototype.addAlt = MovieClip.prototype.addAlt = function(t)
  1798.    {
  1799.       var o = this;
  1800.       var fIn = function()
  1801.       {
  1802.          this.showAlt(t);
  1803.       };
  1804.       var fOut = function()
  1805.       {
  1806.          this.hideAlt();
  1807.       };
  1808.       if(arguments.length > 1)
  1809.       {
  1810.          fIn = arguments[0];
  1811.          fOut = arguments[1];
  1812.       }
  1813.       o.onRollOver = fIn;
  1814.       o.onDragOut = o.onRollOut = o.onPress = o.onRelease = o.onReleaseOutside = fOut;
  1815.       o.useHandCursor = false;
  1816.    };
  1817.    Mouse.showAlt = function(text)
  1818.    {
  1819.       var b = _root.creatSqv("tmp_sqv_alt",8919,10,0,true);
  1820.       b._alpha = 0;
  1821.       b._x = _root._xmouse;
  1822.       b._y = _root._ymouse;
  1823.       b.showAlt(text);
  1824.       b.onRollOut = b.onPress = b.onRelease = b.onReleaseOutside = b.onDragOut = function()
  1825.       {
  1826.          this.hideAlt();
  1827.          _root.tmp_sqv_alt.removeMovieClip();
  1828.       };
  1829.    };
  1830.    ASSetPropFlags(MovieClip.prototype,"showAlt,hideAlt,addAlt",131);
  1831.    ASSetPropFlags(Button.prototype,"showAlt,hideAlt,addAlt",131);
  1832.    ASSetPropFlags(Button,"showAlt",131);
  1833.    _global.C_My = {};
  1834.    C_My.dZerro = function()
  1835.    {
  1836.       if(arguments[0] == 0)
  1837.       {
  1838.          return "0.00";
  1839.       }
  1840.       var dStr = String(Math.floor(arguments[0] * 100));
  1841.       var one = dStr.substr(0,dStr.length - 2);
  1842.       if(one == "")
  1843.       {
  1844.          one = "0";
  1845.       }
  1846.       var two = dStr.substr(-2);
  1847.       if(two == "0")
  1848.       {
  1849.          two = "00";
  1850.       }
  1851.       var arr_tmp = [];
  1852.       var str_tmp = one;
  1853.       while(str_tmp != "")
  1854.       {
  1855.          if(str_tmp.length < 3)
  1856.          {
  1857.             arr_tmp.unshift(str_tmp);
  1858.             break;
  1859.          }
  1860.          arr_tmp.unshift(str_tmp.substr(-3));
  1861.          str_tmp = str_tmp.substr(0,str_tmp.length - 3);
  1862.       }
  1863.       one = arr_tmp.join(",");
  1864.       return one + "." + two;
  1865.    };
  1866.    C_My.paramHide();
  1867.    ASSetPropFlags(_global,"C_My",131);
  1868.    if(!MMSAVE("text_test.txt",_url))
  1869.    {
  1870.       _global.JS = {};
  1871.    }
  1872.    _global.JS.alert = function(msg)
  1873.    {
  1874.       getURL("javascript: void top.alert(\'" + msg + "\');","");
  1875.    };
  1876.    _global.JS.focus = function()
  1877.    {
  1878.       getUrl("javascript: void top.focus();", "");
  1879.    };
  1880.    _global.JS.close = function()
  1881.    {
  1882.       getUrl("javascript: void top.close();", "");
  1883.    };
  1884.    _global.JS.call = function(msg)
  1885.    {
  1886.       getURL("javascript: void " + msg,"");
  1887.    };
  1888.    ASSetPropFlags(_global,"JS",131);
  1889.    if(AsBroadcaster == undefined)
  1890.    {
  1891.       _global.ASBroadcaster = {};
  1892.       ASBroadcaster.initialize = function(obj)
  1893.       {
  1894.          obj.addListener = this.addListener;
  1895.          obj.removeListener = this.removeListener;
  1896.          obj.broadcastMessage = this.broadcastMessage;
  1897.          obj._listeners = [];
  1898.          ASSetPropFlags(obj,["addListener","removeListener","broadcastMessage","_listeners"],7);
  1899.       };
  1900.       ASBroadcaster.addListener = function(obj)
  1901.       {
  1902.          this.removeListener(obj);
  1903.          this._listeners.push(obj);
  1904.          return true;
  1905.       };
  1906.       ASBroadcaster.removeListener = function(obj)
  1907.       {
  1908.          var a = this._listeners;
  1909.          var i = this._listeners.length;
  1910.          while(--i)
  1911.          {
  1912.             if(a[i] == obj)
  1913.             {
  1914.                a.splice(i,1);
  1915.                return true;
  1916.             }
  1917.          }
  1918.          return false;
  1919.       };
  1920.       ASBroadcaster.broadcastMessage = function(theEvent)
  1921.       {
  1922.          var a = this._listeners;
  1923.          var i = this._listeners.length;
  1924.          while(--i)
  1925.          {
  1926.             a[i][theEvent]();
  1927.          }
  1928.       };
  1929.       ASSetPropFlags(ASBroadcaster,null,7);
  1930.       ASSetPropFlags(_global,"ASBroadcaster",131);
  1931.    }
  1932.    Button.prototype.tabEnabled = false;
  1933.    MovieClip.prototype.tabEnabled = false;
  1934.    ASSetPropFlags(Button.prototype,"tabEnabled",7);
  1935.    ASSetPropFlags(MovieClip.prototype,"tabEnabled",7);
  1936.    delete o;
  1937. }
  1938. hello = "Hello Source Viewers! ;) Code Created by 3WGRAPHICS.net";
  1939. delete hello;
  1940. _global.C_SlotCLASS = function()
  1941. {
  1942.    this.curBet = 5;
  1943.    this.nCoins = 1;
  1944.    this.maxCoins = 3;
  1945.    this.userBalance = 10000;
  1946.    this.win = 0;
  1947.    this.nReels = 3;
  1948.    this.table = {};
  1949.    this.table.line_1 = {prize:[3,6,9],prizeCalculate:function(s1, s2, s3, nCoins)
  1950.    {
  1951.       var a = [s1,s2,s3];
  1952.       var s;
  1953.       var symbols = [];
  1954.       var numSymbols = 0;
  1955.       var i = 0;
  1956.       while(i < a.length)
  1957.       {
  1958.          s = a[i];
  1959.          if(s == "x")
  1960.          {
  1961.             return undefined;
  1962.          }
  1963.          if(s == "Cherry")
  1964.          {
  1965.             numSymbols++;
  1966.             symbols.push(1);
  1967.          }
  1968.          else
  1969.          {
  1970.             symbols.push(0);
  1971.          }
  1972.          i++;
  1973.       }
  1974.       if(numSymbols < 1)
  1975.       {
  1976.          return undefined;
  1977.       }
  1978.       var o = {};
  1979.       o.prize = this.prize[nCoins - 1];
  1980.       o.symbols = symbols;
  1981.       return o;
  1982.    }};
  1983.    this.table.line_2 = {prize:[5,10,15],prizeCalculate:function(s1, s2, s3, nCoins)
  1984.    {
  1985.       var a = [s1,s2,s3];
  1986.       var s;
  1987.       var symbols = [];
  1988.       var numSymbols = 0;
  1989.       var i = 0;
  1990.       while(i < a.length)
  1991.       {
  1992.          s = a[i];
  1993.          if(s == "x")
  1994.          {
  1995.             return undefined;
  1996.          }
  1997.          if(s == "Cherry")
  1998.          {
  1999.             numSymbols++;
  2000.             symbols.push(1);
  2001.          }
  2002.          else
  2003.          {
  2004.             symbols.push(0);
  2005.          }
  2006.          i++;
  2007.       }
  2008.       if(numSymbols < 3)
  2009.       {
  2010.          return undefined;
  2011.       }
  2012.       var o = {};
  2013.       o.prize = this.prize[nCoins - 1];
  2014.       o.symbols = symbols;
  2015.       return o;
  2016.    }};
  2017.    this.table.line_3 = {prize:[10,20,30],prizeCalculate:function(s1, s2, s3, nCoins)
  2018.    {
  2019.       if(s1 + s2 + s3 != "LimonLimonLimon")
  2020.       {
  2021.          return undefined;
  2022.       }
  2023.       var o = {};
  2024.       o.prize = this.prize[nCoins - 1];
  2025.       o.symbols = [1,1,1];
  2026.       return o;
  2027.    }};
  2028.    this.table.line_4 = {prize:[10,20,30],prizeCalculate:function(s1, s2, s3, nCoins)
  2029.    {
  2030.       if(s1 + s2 + s3 != "OrangeOrangeOrange")
  2031.       {
  2032.          return undefined;
  2033.       }
  2034.       var o = {};
  2035.       o.prize = this.prize[nCoins - 1];
  2036.       o.symbols = [1,1,1];
  2037.       return o;
  2038.    }};
  2039.    this.table.line_5 = {prize:[10,20,30],prizeCalculate:function(s1, s2, s3, nCoins)
  2040.    {
  2041.       if(s1 + s2 + s3 != "PlumPlumPlum")
  2042.       {
  2043.          return undefined;
  2044.       }
  2045.       var o = {};
  2046.       o.prize = this.prize[nCoins - 1];
  2047.       o.symbols = [1,1,1];
  2048.       return o;
  2049.    }};
  2050.    this.table.line_6 = {prize:[10,20,30],prizeCalculate:function(s1, s2, s3, nCoins)
  2051.    {
  2052.       if(s1 + s2 + s3 != "MelonMelonMelon")
  2053.       {
  2054.          return undefined;
  2055.       }
  2056.       var o = {};
  2057.       o.prize = this.prize[nCoins - 1];
  2058.       o.symbols = [1,1,1];
  2059.       return o;
  2060.    }};
  2061.    this.table.line_7 = {prize:[20,40,60],prizeCalculate:function(s1, s2, s3, nCoins)
  2062.    {
  2063.       if(s1 + s2 + s3 != "B1B1B1")
  2064.       {
  2065.          return undefined;
  2066.       }
  2067.       var o = {};
  2068.       o.prize = this.prize[nCoins - 1];
  2069.       o.symbols = [1,1,1];
  2070.       return o;
  2071.    }};
  2072.    this.table.line_8 = {prize:[40,80,120],prizeCalculate:function(s1, s2, s3, nCoins)
  2073.    {
  2074.       if(s1 + s2 + s3 != "B2B2B2")
  2075.       {
  2076.          return undefined;
  2077.       }
  2078.       var o = {};
  2079.       o.prize = this.prize[nCoins - 1];
  2080.       o.symbols = [1,1,1];
  2081.       return o;
  2082.    }};
  2083.    this.table.line_9 = {prize:[80,160,240],prizeCalculate:function(s1, s2, s3, nCoins)
  2084.    {
  2085.       if(s1 + s2 + s3 != "B3B3B3")
  2086.       {
  2087.          return undefined;
  2088.       }
  2089.       var o = {};
  2090.       o.prize = this.prize[nCoins - 1];
  2091.       o.symbols = [1,1,1];
  2092.       return o;
  2093.    }};
  2094.    this.table.line_10 = {prize:[5,10,15],prizeCalculate:function(s1, s2, s3, nCoins)
  2095.    {
  2096.       var a = [s1,s2,s3];
  2097.       var s;
  2098.       var symbols = [];
  2099.       var numSymbols = 0;
  2100.       var i = 0;
  2101.       while(i < a.length)
  2102.       {
  2103.          s = a[i];
  2104.          if(s == "x")
  2105.          {
  2106.             return undefined;
  2107.          }
  2108.          if(s == "Fruits")
  2109.          {
  2110.             numSymbols++;
  2111.             symbols.push(1);
  2112.          }
  2113.          else
  2114.          {
  2115.             symbols.push(0);
  2116.          }
  2117.          i++;
  2118.       }
  2119.       if(numSymbols < 1)
  2120.       {
  2121.          return undefined;
  2122.       }
  2123.       var o = {};
  2124.       o.prize = this.prize[nCoins - 1];
  2125.       o.symbols = symbols;
  2126.       return o;
  2127.    }};
  2128.    this.table.line_11 = {prize:[25,50,75],prizeCalculate:function(s1, s2, s3, nCoins)
  2129.    {
  2130.       var a = [s1,s2,s3];
  2131.       var s;
  2132.       var symbols = [];
  2133.       var numSymbols = 0;
  2134.       var i = 0;
  2135.       while(i < a.length)
  2136.       {
  2137.          s = a[i];
  2138.          if(s == "x")
  2139.          {
  2140.             return undefined;
  2141.          }
  2142.          if(s == "Fruits")
  2143.          {
  2144.             numSymbols++;
  2145.             symbols.push(1);
  2146.          }
  2147.          else
  2148.          {
  2149.             symbols.push(0);
  2150.          }
  2151.          i++;
  2152.       }
  2153.       if(numSymbols < 2)
  2154.       {
  2155.          return undefined;
  2156.       }
  2157.       var o = {};
  2158.       o.prize = this.prize[nCoins - 1];
  2159.       o.symbols = symbols;
  2160.       return o;
  2161.    }};
  2162.    this.table.line_12 = {prize:[250,500,2500],prizeCalculate:function(s1, s2, s3, nCoins)
  2163.    {
  2164.       if(s1 + s2 + s3 != "FruitsFruitsFruits")
  2165.       {
  2166.          return undefined;
  2167.       }
  2168.       var o = {};
  2169.       o.prize = this.prize[nCoins - 1];
  2170.       o.symbols = [1,1,1];
  2171.       return o;
  2172.    }};
  2173.    this.table.lines = 12;
  2174.    this.reel = {};
  2175.    this.reel.reel_1 = ["B3","x","B1","x","B2","x","Cherry","x","Fruits","x","Plum","x","Limon","x","Orange","x","Melon","x"];
  2176.    this.reel.reel_2 = this.reel.reel_1;
  2177.    this.reel.reel_3 = this.reel.reel_1;
  2178.    this.reel.reel_4 = this.reel.reel_1;
  2179.    this.reel.reel_5 = this.reel.reel_1;
  2180.    this.reelLength = this.reel.reel_1.length;
  2181.    this.reelMap = {};
  2182.    this.reelMap.line_1 = [[1,1],[1,2],[1,3]];
  2183.    this.reelMap.line_2 = [[2,1],[2,2],[2,3]];
  2184.    this.reelMap.line_3 = [[3,1],[3,2],[3,3]];
  2185.    this.reelMap.line_4 = [[2,1],[1,2],[3,3]];
  2186.    this.reelMap.line_5 = [[3,1],[1,2],[2,3]];
  2187.    this.init();
  2188. };
  2189. C_SlotCLASS.prototype = new Object();
  2190. C_SlotCLASS.prototype.init = function()
  2191. {
  2192.    var b = _root.dealButton_btn;
  2193.    b.root = this;
  2194.    b.addAlt("Start reels spin");
  2195.    b.onRelease = function()
  2196.    {
  2197.       this.hideAlt();
  2198.       Conv.put(this.root,"deal",0);
  2199.    };
  2200.    b.useHandCursor = true;
  2201.    this.onMouseDown = function()
  2202.    {
  2203.       if(this.waitUserActions)
  2204.       {
  2205.          this.doUserActions();
  2206.       }
  2207.    };
  2208.    Mouse.addListener(this);
  2209.    this.creatRandomReels();
  2210.    this.setReelsPositions();
  2211.    _root.reelsLinesButtons_mc.setChangeHandler(this,"setReelLines");
  2212.    this.setReelLines(1);
  2213.    _root.tablePrizes_mc.setChangeHandler(this,"setNumberCoins");
  2214.    _root.coinMenu_mc.setChangeHandler(this,"setNumberCoins");
  2215.    _root.coinSizeMenu_mc.setChangeHandler("changeCoin",this);
  2216.    _root.spinButton_mc.setChangeHandler("deal",this);
  2217.    _root.spinButton_mc.setKeys(13,32);
  2218.    this.setNumberCoins(1);
  2219.    this.changeCoin(1);
  2220.    Stage.onCenterScale(640,530);
  2221.    Button.prototype.tabEnabled = false;
  2222.    MovieClip.prototype.tabEnabled = false;
  2223.    this.updatePrizeTable();
  2224. };
  2225. C_SlotCLASS.prototype.deal = function()
  2226. {
  2227.    if(this.userBalance < this.bet)
  2228.    {
  2229.       Mouse.showAlt("You do not have enough money for betting. \rPlease visit the cashier \ror place a smaller bet if possible.");
  2230.       return undefined;
  2231.    }
  2232.    if(this.waitUserActions)
  2233.    {
  2234.       this.doUserActions();
  2235.    }
  2236.    if(this.locked)
  2237.    {
  2238.       return undefined;
  2239.    }
  2240.    this.lock();
  2241.    this.win = 0;
  2242.    _root.messageDisplay = "";
  2243.    this.userBalance -= this.bet;
  2244.    _root.balanceMashine_mc.balance = this.userBalance;
  2245.    _root.newSound("insertCoin",100,this.numberCoins);
  2246.    this.waitUserActions = true;
  2247.    Conv.put(this,"hideReelsLines","6");
  2248.    Conv.put(this,"startAnim",(random(5) + 5) * 100);
  2249.    this.creatRandomReels();
  2250.    if(_level5)
  2251.    {
  2252.       C_Server.round(this.bet,this.numberCoins,this.reelLines);
  2253.       return undefined;
  2254.    }
  2255.    this.calculate();
  2256.    this.displayGameResult();
  2257.    Conv.put(this,"unlock",0);
  2258. };
  2259. C_SlotCLASS.prototype.lock = function()
  2260. {
  2261.    this.locked = true;
  2262.    _root.dealButton_btn._alpha = 50;
  2263.    _root.coinSizeMenu_mc.lock();
  2264.    _root.spinButton_mc.lock();
  2265.    this.animLock();
  2266.    Button.prototype.enabled = false;
  2267.    MovieClip.prototype.enabled = false;
  2268. };
  2269. C_SlotCLASS.prototype.unlock = function()
  2270. {
  2271.    this.locked = false;
  2272.    _root.dealButton_btn._alpha = 100;
  2273.    _root.coinSizeMenu_mc.unlock();
  2274.    _root.spinButton_mc.unlock();
  2275.    Button.prototype.enabled = true;
  2276.    MovieClip.prototype.enabled;
  2277.    if(!this.isWin)
  2278.    {
  2279.       this.animUnlock();
  2280.    }
  2281. };
  2282. C_SlotCLASS.prototype.displayGameResult = function()
  2283. {
  2284.    Conv.include(this,"animReelsPositions",0);
  2285.    Conv.include(this,"displayPrize","1");
  2286.    Conv.put(this,"display","1");
  2287.    if(this.isWin)
  2288.    {
  2289.       Conv.put(this,"blinkReels","1");
  2290.       Conv.put(this,"playWinAnim","1");
  2291.    }
  2292. };
  2293. C_SlotCLASS.prototype.displayPrize = function()
  2294. {
  2295.    if(!this.isWin)
  2296.    {
  2297.       return undefined;
  2298.    }
  2299.    var a;
  2300.    var m;
  2301.    var r;
  2302.    var i = 1;
  2303.    while(i <= this.nReels)
  2304.    {
  2305.       r = _root["reel_" + i + "_mc"].reel_mc;
  2306.       a = r.symbols;
  2307.       var j = 0;
  2308.       while(j < a.length)
  2309.       {
  2310.          a[j]._brightness = 70;
  2311.          j++;
  2312.       }
  2313.       i++;
  2314.    }
  2315.    a = this.prizeInfo;
  2316.    var line;
  2317.    var symbols;
  2318.    var lines_array = [];
  2319.    var rows_array = {};
  2320.    var i = 0;
  2321.    while(i < a.length)
  2322.    {
  2323.       line = a[i].line;
  2324.       symbols = a[i].symbols;
  2325.       m = this.reelMap["line_" + line];
  2326.       lines_array.push(line);
  2327.       rows_array[a[i].row] = true;
  2328.       var mc;
  2329.       var j = 0;
  2330.       while(j < symbols.length)
  2331.       {
  2332.          if(symbols[j])
  2333.          {
  2334.             mc = _root["reel_" + m[j][1] + "_mc"].reel_mc["reelSimbols" + m[j][0] + "_mc"];
  2335.             mc._brightness = 0;
  2336.          }
  2337.          j++;
  2338.       }
  2339.       this.win += a[i].prize;
  2340.       i++;
  2341.    }
  2342.    this.win *= this.coin;
  2343.    _root.reelsLines_mc.showLines(lines_array);
  2344.    _root.reelsLines_mc._visible = 1;
  2345.    this.prizeLines = lines_array;
  2346.    var o = rows_array;
  2347.    rows_array = [];
  2348.    for(var v in o)
  2349.    {
  2350.       rows_array.push(v);
  2351.    }
  2352.    _root.tablePrizes_mc.displayPrize(rows_array);
  2353.    this.userBalance += this.win;
  2354.    if(_level5)
  2355.    {
  2356.       this.userBalance = this.userBalance_from_server;
  2357.    }
  2358.    _root.newSound("win");
  2359. };
  2360. C_SlotCLASS.prototype.display = function()
  2361. {
  2362.    this.bet = this.numberCoins * this.reelLines * this.coin;
  2363.    var betText = "Total Bet: $" + this.bet.dZero();
  2364.    var linesText = this.reelLines + " Line";
  2365.    if(this.reelLines > 1)
  2366.    {
  2367.       linesText += "s";
  2368.    }
  2369.    var coinsText = this.numberCoins + " Coin";
  2370.    if(this.numberCoins > 1)
  2371.    {
  2372.       coinsText += "s";
  2373.    }
  2374.    var winText = "You Win: $" + this.win.dZero();
  2375.    _root.totalBet_mc.setText(betText);
  2376.    _root.totalLines_mc.setText(coinsText + ", " + linesText);
  2377.    _root.totalWin_mc.setText(winText);
  2378.    _root.balanceMashine_mc.balance = this.userBalance;
  2379. };
  2380. C_SlotCLASS.prototype.doUserActions = function()
  2381. {
  2382.    if(this.locked)
  2383.    {
  2384.       return undefined;
  2385.    }
  2386.    this.waitUserActions = false;
  2387.    if(this.win)
  2388.    {
  2389.       var r;
  2390.       var a;
  2391.       var i = 1;
  2392.       while(i <= this.nReels)
  2393.       {
  2394.          r = _root["reel_" + i + "_mc"].reel_mc;
  2395.          a = r.symbols;
  2396.          var j = 0;
  2397.          while(j < a.length)
  2398.          {
  2399.             a[j]._brightness = 0;
  2400.             j++;
  2401.          }
  2402.          i++;
  2403.       }
  2404.       _root.tablePrizes_mc.setCoins(this.numberCoins);
  2405.       _root.reelsLines_mc.blink();
  2406.       var lines = this.reelLines;
  2407.       this.reelLines = undefined;
  2408.       this.setReelLines(lines);
  2409.    }
  2410.    this.showReelsLines();
  2411.    if(this.isWin)
  2412.    {
  2413.       this.animUnlock();
  2414.    }
  2415. };
  2416. C_SlotCLASS.prototype.calculate = function()
  2417. {
  2418.    this.prizeInfo = [];
  2419.    var line;
  2420.    var prizeInfo;
  2421.    var i = 1;
  2422.    while(i <= this.reelLines)
  2423.    {
  2424.       line = C_Slot.getLineSymbols(C_Slot.getLine(i));
  2425.       prizeInfo = this.checkPrize(line,i);
  2426.       if(prizeInfo)
  2427.       {
  2428.          prizeInfo.line = i;
  2429.          this.prizeInfo.push(prizeInfo);
  2430.       }
  2431.       i++;
  2432.    }
  2433.    this.isWin = this.prizeInfo.length > 0;
  2434. };
  2435. C_SlotCLASS.prototype.checkPrize = function(lineSymbols_array)
  2436. {
  2437.    var prizeInfo;
  2438.    var o;
  2439.    var results_array = [];
  2440.    lineSymbols_array.push(this.numberCoins);
  2441.    var i = 1;
  2442.    while(i <= this.table.lines)
  2443.    {
  2444.       o = this.table["line_" + i];
  2445.       prizeInfo = o.prizeCalculate.apply(o,lineSymbols_array);
  2446.       prizeInfo.row = i;
  2447.       results_array.push(prizeInfo);
  2448.       i++;
  2449.    }
  2450.    results_array.sortOnNum("prize");
  2451.    return results_array.pop();
  2452. };
  2453. C_SlotCLASS.prototype.creatRandomReels = function()
  2454. {
  2455.    this.randomReels = [];
  2456.    var randomPos;
  2457.    var i = 0;
  2458.    while(i < this.nReels)
  2459.    {
  2460.       randomPos = Math.floor(Math.random() * this.reelLength) + 1;
  2461.       this.randomReels.push(randomPos);
  2462.       i++;
  2463.    }
  2464.    return this.randomReels;
  2465. };
  2466. C_SlotCLASS.prototype.getLine = function(nLine)
  2467. {
  2468.    var map = this.reelMap["line_" + nLine];
  2469.    var lineArray = [];
  2470.    var reelPos;
  2471.    var i = 0;
  2472.    while(i < map.length)
  2473.    {
  2474.       if(map[i][0] == 1)
  2475.       {
  2476.          reelPos = this.randomReels[i];
  2477.       }
  2478.       else if(map[i][0] == 2)
  2479.       {
  2480.          reelPos = this.randomReels[i] + 1;
  2481.          if(reelPos > this.reelLength)
  2482.          {
  2483.             reelPos %= this.reelLength;
  2484.          }
  2485.       }
  2486.       else if(map[i][0] == 3)
  2487.       {
  2488.          reelPos = this.randomReels[i] - 1;
  2489.          if(reelPos == 0)
  2490.          {
  2491.             reelPos = this.reelLength;
  2492.          }
  2493.       }
  2494.       lineArray.push(reelPos);
  2495.       i++;
  2496.    }
  2497.    return lineArray;
  2498. };
  2499. C_SlotCLASS.prototype.getLineSymbols = function(lineArray)
  2500. {
  2501.    var curReel;
  2502.    var lineSymbolsArray = [];
  2503.    var i = 0;
  2504.    while(i < lineArray.length)
  2505.    {
  2506.       lineSymbolsArray.push(this.reel["reel_" + (i + 1)][lineArray[i] - 1]);
  2507.       i++;
  2508.    }
  2509.    return lineSymbolsArray;
  2510. };
  2511. C_SlotCLASS.prototype.setReelsPositions = function()
  2512. {
  2513.    var reel;
  2514.    var i = 0;
  2515.    while(i < this.randomReels.length)
  2516.    {
  2517.       reel = _root["reel_" + (i + 1) + "_mc"];
  2518.       reel.blurAnim.stop();
  2519.       reel.blurAnim.hide();
  2520.       reel.reel_mc.setPos(this.randomReels[i]);
  2521.       i++;
  2522.    }
  2523. };
  2524. C_SlotCLASS.prototype.animReelsPositions = function()
  2525. {
  2526.    var reel;
  2527.    var i = 0;
  2528.    while(i < this.randomReels.length)
  2529.    {
  2530.       reel = _root["reel_" + (i + 1) + "_mc"];
  2531.       Conv.put(reel.blurAnim,"stop",0);
  2532.       Conv.put(reel.blurAnim,"hide",0);
  2533.       Conv.put(reel.reel_mc,"set",0,"_y",reel.reel_mc._y - 2);
  2534.       Conv.put(reel.reel_mc,"setPos","1",this.randomReels[i]);
  2535.       if(i == this.randomReels.length - 1)
  2536.       {
  2537.          Conv.put(this.soundSpinHolder,"stopSound",0);
  2538.          Conv.put(this.soundSpinHolder,"removeMovieClip",0);
  2539.       }
  2540.       Conv.put(reel.reel_mc,"newSound",0,"reelStop");
  2541.       Conv.put(reel.reel_mc,"set",0,"_y",reel.reel_mc._y);
  2542.       if(i < this.randomReels.length - 1)
  2543.       {
  2544.          Conv.put(empty,(random(10) + 5) * 100);
  2545.       }
  2546.       else
  2547.       {
  2548.          Conv.put(empty,"2");
  2549.       }
  2550.       i++;
  2551.    }
  2552. };
  2553. C_SlotCLASS.prototype.startAnim = function()
  2554. {
  2555.    var i = 0;
  2556.    while(i < this.reelLength)
  2557.    {
  2558.       _root["reel_" + (i + 1) + "_mc"].blurAnim.show();
  2559.       _root["reel_" + (i + 1) + "_mc"].blurAnim.gotoAndPlay(random(5) + 1);
  2560.       i++;
  2561.    }
  2562.    this.soundSpinHolder = _root.createEmptyMovieClip("soundSpinHolder_mc",9899);
  2563.    this.soundSpinHolder.newSound("spin",100,99);
  2564. };
  2565. C_SlotCLASS.prototype.setReelLines = function(num)
  2566. {
  2567.    if(this.reelLines == num)
  2568.    {
  2569.       return undefined;
  2570.    }
  2571.    var isStarted = this.reelLines == undefined;
  2572.    var lineUp = num > this.reelLines;
  2573.    this.reelLines = num;
  2574.    var a = [];
  2575.    var i = 1;
  2576.    while(i <= num)
  2577.    {
  2578.       a.push(i);
  2579.       i++;
  2580.    }
  2581.    _root.reelsLines_mc.showLines(a);
  2582.    _root.reelsLinesButtons_mc.setPos(this.reelLines);
  2583.    this.display();
  2584.    if(isStarted)
  2585.    {
  2586.       return undefined;
  2587.    }
  2588.    if(lineUp)
  2589.    {
  2590.       _root.newSound("lineUp");
  2591.    }
  2592.    else
  2593.    {
  2594.       _root.newSound("lineDown");
  2595.    }
  2596. };
  2597. C_SlotCLASS.prototype.hideReelsLines = function()
  2598. {
  2599.    _root.reelsLines_mc._visible = 0;
  2600. };
  2601. C_SlotCLASS.prototype.showReelsLines = function()
  2602. {
  2603.    _root.reelsLines_mc._visible = 1;
  2604. };
  2605. C_SlotCLASS.prototype.blinkReels = function()
  2606. {
  2607.    _root.reelsLines_mc.blink(this.prizeLines);
  2608. };
  2609. C_SlotCLASS.prototype.changeCoin = function(c)
  2610. {
  2611.    if(this.locked)
  2612.    {
  2613.       return undefined;
  2614.    }
  2615.    var isStarted = this.coin == undefined;
  2616.    if(this.coin == c)
  2617.    {
  2618.       return undefined;
  2619.    }
  2620.    this.coin = c;
  2621.    this.display();
  2622.    if(!isStarted)
  2623.    {
  2624.       _root.newSound("coinDrop",100);
  2625.    }
  2626. };
  2627. C_SlotCLASS.prototype.setNumberCoins = function(c)
  2628. {
  2629.    if(this.locked)
  2630.    {
  2631.       return undefined;
  2632.    }
  2633.    if(this.numberCoins == c)
  2634.    {
  2635.       return undefined;
  2636.    }
  2637.    var isStarted = this.numberCoins == undefined;
  2638.    this.numberCoins = c;
  2639.    if(_root.tablePrizes_mc.coins != this.numberCoins)
  2640.    {
  2641.       _root.tablePrizes_mc.setCoins(this.numberCoins);
  2642.    }
  2643.    if(_root.coinMenu_mc.coins != this.numberCoins)
  2644.    {
  2645.       _root.coinMenu_mc.setCoins(this.numberCoins);
  2646.    }
  2647.    this.display();
  2648.    if(!isStarted)
  2649.    {
  2650.       _root.newSound("coinDrop",100);
  2651.    }
  2652. };
  2653. C_SlotCLASS.prototype.updatePrizeTable = function()
  2654. {
  2655.    _root.tablePrizes_mc.setTablePrizes(this.table);
  2656. };
  2657. _global.C_Slot = new C_SlotCLASS();
  2658. ASSetPropFlags(_global,"C_Slot,C_SlotCLASS",131);
  2659. if(SharedObject.getLocal("game_config").data.serverOn)
  2660. {
  2661.    _root._visible = 0;
  2662. }
  2663. C_SlotCLASS.prototype.animLock = function()
  2664. {
  2665. };
  2666. C_SlotCLASS.prototype.animUnLock = function()
  2667. {
  2668. };
  2669. C_SlotCLASS.prototype.playWinAnim = function()
  2670. {
  2671. };
  2672. this.stop();
  2673. var sTemp = _url;
  2674. if(this._url.lastIndexOf("?") != -1)
  2675. {
  2676.    sTemp = this._url.substr(0,this._url.lastIndexOf("?"));
  2677. }
  2678. sTemp = sTemp.substr(0,sTemp.lastIndexOf("/")) + "/";
  2679. loadMovieNum(sTemp + "index_cross.swf",1);
  2680.